package com.jx.servicrimpl;


import com.jx.dao.FindAllDepDao;
import com.jx.daoimpl.FindAllDepDaoImpl;
import com.jx.model.Dep;
import com.jx.service.FindAllDepService;

import net.sf.json.JSON;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class FindAllDepServiceImpl implements FindAllDepService {
	/**
	 * 查找部门
	 */
	FindAllDepDao fadd=new FindAllDepDaoImpl();
	@Override
	public JSONObject findAllDepService(int start,int pagesize) {
		// TODO Auto-generated method stub
		JSONObject json=new JSONObject();
		//分页
		json.put("total", fadd.findTotalDep());
		json.put("rows", JSONArray.fromObject(fadd.findAllDeoDao(start,pagesize)));
		return json;
	}

}
